package com.ruoyi.web.controller.datastatistics;

import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.datastatistics.domain.V9HourEBean;
import com.ruoyi.datastatistics.service.IV9HourEBeanService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 转存逐时Controller
 *
 * @author gdqt
 * @date 2025-11-21
 */
@RestController
@RequestMapping("/datastatistics/V9HourEBean")
public class V9HourEBeanController extends BaseController
{
    @Autowired
    private IV9HourEBeanService v9HourEBeanService;

    /**
     * 查询转存逐时列表
     */
    // @PreAuthorize("@ss.hasPermi('datastatistics:V9HourEBean:list')")
    @GetMapping("/list")
    public TableDataInfo list(V9HourEBean v9HourEBean)
    {
        // startPage();
        List<V9HourEBean> list = v9HourEBeanService.selectV9HourEBeanList(v9HourEBean);
        return getDataTable(list);
    }

    /**
     * 导出转存逐时列表
     */
    @PreAuthorize("@ss.hasPermi('datastatistics:V9HourEBean:export')")
    @Log(title = "转存逐时", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, V9HourEBean v9HourEBean)
    {
        List<V9HourEBean> list = v9HourEBeanService.selectV9HourEBeanList(v9HourEBean);
        ExcelUtil<V9HourEBean> util = new ExcelUtil<V9HourEBean>(V9HourEBean.class);
        util.exportExcel(response, list, "转存逐时数据");
    }

    /**
     * 获取转存逐时详细信息
     */
    // @PreAuthorize("@ss.hasPermi('datastatistics:V9HourEBean:query')")
    // @GetMapping(value = "/{TagTime}")
    // public AjaxResult getInfo(@PathVariable("TagTime") Long TagTime)
    // {
    //     return success(v9HourEBeanService.selectV9HourEBeanByTagTime(TagTime));
    // }

    /**
     * 新增转存逐时
     */
    @PreAuthorize("@ss.hasPermi('datastatistics:V9HourEBean:add')")
    @Log(title = "转存逐时", businessType = BusinessType.INSERT)
    @PostMapping
    public AjaxResult add(@RequestBody V9HourEBean v9HourEBean)
    {
        return toAjax(v9HourEBeanService.insertV9HourEBean(v9HourEBean));
    }

    /**
     * 修改转存逐时
     */
    // @PreAuthorize("@ss.hasPermi('datastatistics:V9HourEBean:edit')")
    // @Log(title = "转存逐时", businessType = BusinessType.UPDATE)
    // @PutMapping
    // public AjaxResult edit(@RequestBody V9HourEBean v9HourEBean)
    // {
    //     return toAjax(v9HourEBeanService.updateV9HourEBean(v9HourEBean));
    // }

    /**
     * 删除转存逐时
     */
    // @PreAuthorize("@ss.hasPermi('datastatistics:V9HourEBean:remove')")
    // @Log(title = "转存逐时", businessType = BusinessType.DELETE)
	// @DeleteMapping("/{TagTimes}")
    // public AjaxResult remove(@PathVariable Long[] TagTimes)
    // {
    //     return toAjax(v9HourEBeanService.deleteV9HourEBeanByTagTimes(TagTimes));
    // }
}
